function G = normalequation(x)
G = [length(x),sum(x),sum(x.^2);
    sum(x),sum(x.^2),sum(x.^3);
    sum(x.^2),sum(x.^3),sum(x.^4)];